package deweb.cimaplanning.beans;

import java.util.ArrayList;

import deweb.cimaplanning.dao.PlantsVersionsMonthsDao;

public class PlantsVersionsMonthsBean {
	private PlantsVersionsMonthsDao dao = null;
	
	public PlantsVersionsMonthsBean() {
		dao = new PlantsVersionsMonthsDao();
	}
	
	public ArrayList browse(){
		return browse(0, 0);
	}
	
	public ArrayList browse(int versionId){
		return browse(versionId, 0);
	}
	
	public ArrayList browse(int versionId, int plantId){
		ArrayList results = null;
		
		try {
			results = dao.getArray(versionId, plantId);
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
		
		return results;
	}
}
